package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Objects;

/**
 * 权限实体类
 */
@TableName("t_grade")
public class GradeBean {
    /**
     * 编号
     */
    @TableId(value = "pk_gradeId", type = IdType.AUTO)
    private Integer id;
    /**
     * 权限名
     */
    @TableField(value = "g_name")
    private String name;


    public GradeBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "GradeBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}'+"\n";
    }

    @Override
    public int hashCode() {
        return this.id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GradeBean gradeBean = (GradeBean) o;
        return Objects.equals(id, gradeBean.id) && Objects.equals(name, gradeBean.name);
    }
}
